package src.com.hpu.tools;

public class JsonTools {

	/**
	 * 将服务器返回的数据转换为数组
	 * 
	 * @param jsonString
	 * @return
	 */
	public static String parseJsonString(String jsonString) {
		jsonString = jsonString.replaceAll("\\],", "#");
		jsonString = jsonString.replaceAll("\",\"", "\"&\"");
		jsonString = jsonString.replaceAll("(\\[|\\])", "");
		jsonString = jsonString.replaceAll("[\"\n]", "");
		jsonString=jsonString.replaceAll("[\\(（][\\s\\S]*?[\\)）]", "");
		return jsonString;
	}
	
	public static String parseJsonString3(String jsonString) {
		jsonString = jsonString.replaceAll("\\]\\],", "#");
		jsonString = jsonString.replaceAll("\\],", "%");
		jsonString = jsonString.replaceAll("\",\"", "\"&\"");
		jsonString = jsonString.replaceAll("(\\[|\\])", "");
		jsonString = jsonString.replaceAll("\"", "");
		jsonString=jsonString.replaceAll("[\\(（][\\s\\S]*?[\\)）]", "");
		return jsonString;
	}

}
